]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Notifications with CRITICAL urgency are no longer timed out
authorHellyna Ng <hellyna@hellyna.com>
Tue, 11 Jan 2011 21:33:03 +0000 (05:33 +0800)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Tue, 11 Jan 2011 21:38:46 +0000 (16:38 -0500)
Notifications with CRITICAL urgency should not pop down until the user interacts with them.

https://bugzilla.gnome.org/show_bug.cgi?id=630942

js/ui/messageTray.js

index 04a968b56aeeae21750356a5c2dcb7398da6d886..da8f7e891ab3d4a116e33abf7f3624c38bc0a454 100644 (file)
@@ -1379,7 +1379,7 @@ MessageTray.prototype = {
         let notificationsPending = this._notificationQueue.length > 0;
         let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
         let notificationExpanded = this._notificationBin.y < 0;
-        let notificationExpired = (this._notificationTimeoutId == 0 && !this._pointerInTray && !this._locked) || this._notificationRemoved;
+        let notificationExpired = (this._notificationTimeoutId == 0 && !(this._notification && this._notification.urgency == Urgency.CRITICAL) && !this._pointerInTray && !this._locked) || this._notificationRemoved;
 
         if (this._notificationState == State.HIDDEN) {
             if (notificationsPending)
@@ -1527,7 +1527,8 @@ MessageTray.prototype = {
    },
 
     _showNotificationCompleted: function() {
-        this._updateNotificationTimeout(NOTIFICATION_TIMEOUT * 1000);
+        if (this._notification.urgency != Urgency.CRITICAL)
+            this._updateNotificationTimeout(NOTIFICATION_TIMEOUT * 1000);
     },
 
     _updateNotificationTimeout: function(timeout) {